package method;

import java.util.Arrays;

public class MethodDemo4 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        System.out.println("arr=" +arr);
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(arr));
    }
    public static void chang(int[] arr){
        System.out.println("arr"+arr);
        System.out.println(Arrays.toString(arr));
        for (int i = 0; i < arr.length; i++) {
            if (i%2==0){
                arr[i] *=2;

            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
